/********************************************
 * Breadcrumb Styles
 ********************************************/

:root {
  --bs-primary: #010485;
  --primary-color: #010485;
  --gold-color: #010485;
  --bs-primary-rgb: 16, 70, 49;
  --bs-primary-text-emphasis: #010485;
  --bs-primary-bg-subtle: #d1e0d8;
  --bs-primary-border-subtle: #a3c2b2;

  /* Apply the font to body or specific elements */
  body {
    font-family: "DIN Next LT Arabic", -apple-system, BlinkMacSystemFont,
      "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  }
  .body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }
  .flex-1 {
    flex: 1 1 0;
  }

  /* Font weight utility classes */
  .font-ultralight {
    font-weight: 200;
  }

  .font-light {
    font-weight: 300;
  }

  .font-regular {
    font-weight: 400;
  }

  .font-medium {
    font-weight: 500;
  }

  .font-bold {
    font-weight: 700;
  }

  .font-heavy {
    font-weight: 800;
  }

  .font-black {
    font-weight: 900;
  }

  /* Gold color for accent */
  --bs-gold: #a3875b;
  --bs-gold-rgb: 212, 178, 84;

  /* Adjusting other Bootstrap variables for better harmony */
  --bs-link-color: #010485;
  --bs-link-hover-color: #010485;
  --bs-focus-ring-color: rgba(16, 70, 49, 0.25);

  /* Font family */
  --bs-font-sans-serif: "DIN Next LT Arabic", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-body-font-family: var(--bs-font-sans-serif);

  /* Component specific overrides */
  --bs-btn-active-bg: #010485;
  --bs-btn-active-border-color: #010485;
}
/* browser scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb {
  background: #6c757d;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: #010485;
}
html {
  font-size: 100%;
  box-sizing: border-box;
}
*,
*::before,
*::after {
  box-sizing: inherit;
}

.gca-stroke {
  font-size: 22px;
  color: #161616;
  vertical-align: sub;
}

.gca-stroke-16 {
  font-size: 16px;
}
.gca-stroke-24 {
  font-size: 24px;
}
.gca-stroke-32 {
  font-size: 32px;
}

.gca-stroke-40 {
  font-size: 40px;
}
.gca-stroke-48 {
  font-size: 48px;
}
.gca-stroke-64 {
  font-size: 64px;
}
.border-white-30 {
  border-color: rgb(255 255 255 / 0.3) !important;
}
/* Button primary */
.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: #010485;
  --bs-btn-border-color: #010485;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #010485;
  --bs-btn-hover-border-color: #010485;
  --bs-btn-focus-shadow-rgb: 73, 115, 98;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #010485;
  --bs-btn-active-border-color: #010485;
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: #010485;
  --bs-btn-disabled-border-color: #010485;
}

/* Button outline primary */
.btn-outline-primary {
  --bs-btn-color: #010485;
  --bs-btn-border-color: #010485;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #010485;
  --bs-btn-hover-border-color: #010485;
  --bs-btn-focus-shadow-rgb: 16, 70, 49;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #010485;
  --bs-btn-active-border-color: #010485;
  --bs-btn-disabled-color: #010485;
  --bs-btn-disabled-bg: transparent;
  --bs-btn-disabled-border-color: #010485;
}

/* Background colors */
.bg-primary {
  background-color: #010485 !important;
}

/* Text colors */
.text-primary {
  color: #010485 !important;
}

/* Border colors */
.border-primary {
  border-color: #010485 !important;
}

/* Links */
a {
  color: #010485;
}
a:hover {
  color: #010485;
}
p {
  font-size: 1.2rem;
}

/* Form controls */
.form-control:focus,
.form-select:focus {
  border-color: #a3c2b2;
  box-shadow: 0 0 0 0.25rem rgba(16, 70, 49, 0.25);
}

/* Custom form controls */
.form-check-input:checked {
  background-color: #010485;
  border-color: #010485;
}

/* Modal headers */
.modal-header {
  border-bottom-color: rgba(16, 70, 49, 0.2);
}

/* Gold accent color utility classes */
.text-gold {
  color: #a3875b !important;
}
.bg-gold {
  background-color: #a3875b !important;
}
.bg-gold-10 {
  background-color: rgba(163, 135, 91, 0.1) !important;
}
.border-gold {
  border-color: #a3875b !important;
}

/* Additional styles for specific components */
.card-header {
  background-color: rgba(16, 70, 49, 0.05);
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  background-color: #010485;
  color: #fff;
}

/* Pagination */
.page-item.active .page-link {
  background-color: #010485;
  border-color: #010485;
}
.page-link {
  color: #010485;
}
.page-link:hover {
  color: #010485;
}

/* Progress bars */
.progress-bar {
  background-color: #010485;
}

/* List groups */
.list-group-item.active {
  background-color: #010485;
  border-color: #010485;
}

/* Dropdown */
.dropdown-item.active,
.dropdown-item:active {
  background-color: #dee2e6;
}

/* Ensure the new green color is used in mode-toggle switch we created earlier */
.mode-toggle .form-check-input:checked {
  background-color: #010485;
  border-color: #010485;
}

/* Custom dropdown styling with gca-arrow-down-01 */
.dropdown-toggle::after {
  display: none !important; /* Hide default Bootstrap dropdown arrow */
}

/* Custom Cards Shadow */
.card {
  box-shadow: 0px 12px 16px -4px rgba(16, 24, 40, 0.08),
    0px 4px 6px -2px rgba(16, 24, 40, 0.03) !important;
  border: 0 !important;
}

#international-relations-section .card {
  box-shadow: none !important;
}

/* Leadership Card Styles */
.leadership-card .d-flex {
  position: relative;
  overflow: hidden;
}

.leadership-card .d-flex::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, #fff 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

.text-justify {
  text-align: justify;
}

/********************************************
 * Breadcrumb Styles
 ********************************************/
.breadcrumb-bg {
  background-color: #f6f5f3;
  background-image: url("");
  background-repeat: no-repeat;
  background-position: right top;
  background-size: auto 100%;
  width: 100%;
  height: 100%;
  margin: 0;
}

/********************************************
 * News Styles
*********************************************/
.news-card {
  overflow: hidden;
  border-radius: 16px;
  height: 350px;
}

/* .news-card:hover {
  background: linear-gradient(to top, var(--gold-color) 0%, white 100%);
  color: #ffffff;
} */

.news-card img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease-in-out;
}

.news-card:hover img {
  transform: scale(1.1);
  transition: transform 0.3s ease-in-out;
  border-radius: 16px;
}

/* .news-card:hover span,
.news-card:hover h5 a {
  color: #ffffff !important;
} */

/* .news-card img {
  transition: transform 0.3s ease-in-out;
} */

.news-card-image-container {
  overflow: hidden;
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
  .news-card {
    height: 120px;
  }

  .news-card img {
    height: 120px;
  }
}

/*  Small devices (tablets, 768px and down) */
@media (max-width: 768px) {
  .news-card {
    height: 180px;
  }

  .news-card img {
    height: 180px;
  }
}

/*  Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
  .news-card {
    height: 180px;
  }

  .news-card img {
    height: 180px;
  }
}

/*  Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  .news-card {
    height: 250px;
  }

  .news-card img {
    height: 250px;
  }
}

/*  X-Large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .news-card {
    height: 280px;
  }

  .news-card img {
    height: 280px;
  }
}

/*  XX-Large devices (larger desktops, 1400px and up) */
@media (min-width: 1400px) {
  .news-card {
    height: 350px;
  }

  .news-card img {
    height: 350px;
  }
}


/********************************************
 * Slider Cards
*********************************************/
.cards-slider-container #cards-slider {
  overflow: hidden;
  padding: 60px 0;
  position: relative;
  width: 100%;
}

.cards-list {
  display: flex;
  transition: transform 0.5s ease;
  width: 100%;
  position: relative;
  height: 500px;
}

.slider-card {
  position: absolute;
  padding: 15px;
  transition: all 0.5s ease;
  top: 0px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  box-sizing: border-box;
  min-width: 380px;
  max-width: 500px;
  height: 500px;
  width: 100%;
  border-radius: 16px !important;
}

.slider-card.active {
  z-index: 5;
  transform: translateX(-50%) scale(1);
}

.slider-card.left-1 {
  z-index: 4;
  transform: translateX(-120%) scale(0.9);
}

.slider-card.left-2 {
  z-index: 3;
  transform: translateX(-190%) scale(0.8);
}

.slider-card.right-1 {
  z-index: 4;
  transform: translateX(20%) scale(0.9);
}

.slider-card.right-2 {
  z-index: 3;
  transform: translateX(90%) scale(0.8);
}

.slider-card .card-item {
  transition: all 0.5s ease;
  transform-origin: center;
  width: 100%;
  height: 100%;
}

/* Updated slider card container */
.slider-card .card {
  border-radius: 16px !important;
  transition: all 0.3s ease;
  height: 100%;
  overflow: hidden;
}

.slider-card .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(16, 70, 49, 0.15) !important;
}

/* Card image container */
.slider-card .card-img-container {
  border-radius: 16px 16px 0 0;
}

.slider-card .card-img-top {
  transition: transform 0.3s ease;
  border-radius: 16px 16px 0 0;
}

.slider-card .card:hover .card-img-top {
  transform: scale(1.05);
}

/* Date badge styling */
.slider-card .badge.bg-primary {
  background-color: var(--primary-color) !important;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Card title styling */
.slider-card .card-title {
  font-size: 1.1rem;
  line-height: 1.4;
  color: var(--primary-color);
}

/* Card text styling */
.slider-card .card-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Button styling */
.slider-card .btn-primary {
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.slider-card .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(1, 4, 133, 0.3);
}

/* Responsive adjustments for slider cards */
@media (max-width: 768px) {
  .slider-card .card-img-top {
    height: 160px !important;
  }

  .slider-card .card-body {
    padding: 1rem !important;
  }

  .slider-card .card-title {
    font-size: 1rem;
  }
  .slider-card .card-text {
    font-size: 0.9rem !important;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .slider-card {
    width: 60%;
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .slider-card {
    width: 28%;
  }
}

@media (min-width: 1200px) {
  .slider-card {
    width: 19%;
  }
}


/********************************************
 * Footer Styles
*********************************************/

.footer-bg {
  background-color: #010485;
  background-image: url("");
  background-repeat: no-repeat;
  background-position: right top;
  background-size: auto 100%;
  width: 100%;
  height: 100%;
  margin: 0;
  border-top: #a3875b 3px solid;
}

/********************************************
 * Text Trim Utilities
*********************************************/

.text-trim {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
}

.text-trim-1 {
  -webkit-line-clamp: 1;
  line-clamp: 1;
}

.text-trim-2 {
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.text-trim-3 {
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.text-trim-4 {
  -webkit-line-clamp: 4;
  line-clamp: 4;
}

.text-trim-5 {
  -webkit-line-clamp: 5;
  line-clamp: 5;
}

.text-trim-6 {
  -webkit-line-clamp: 6;
  line-clamp: 6;
}

/* Styles for description text in par cards */
.description-text {
  color: #6c757d;
  font-size: 0.9rem;
  min-height: 4.5em; /* Approximately 3 lines of text */
  cursor: pointer;
}

/********************************************
 * Image Utilities
 ********************************************/

/* Enhanced image utilities for consistent sizing */
.img-fluid {
  max-width: 100%;
  height: auto;
}

.img-cover {
  object-fit: cover;
}

.img-contain {
  object-fit: contain;
}

.img-square {
  aspect-ratio: 1;
  object-fit: cover;
}

/* Leadership card specific image sizing */
.leadership-img {
  width: 200px;
  height: 200px;
  object-fit: cover;
}

/* Responsive leadership images */
@media (max-width: 768px) {
  .leadership-img {
    width: 150px;
    height: 150px;
  }
}

@media (max-width: 576px) {
  .leadership-img {
    width: 120px;
    height: 120px;
  }
}
/*custum tool tip style from a developer*/


/* ====== Tooltip Core Styles ====== */
.custom-tooltip {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.custom-tooltip .tooltip-text {
  visibility: hidden;
  background-color: #333;
  color: #fff;
  text-align: start; /* Changed to 'start' for better RTL/LTR support */
  padding: 10px 14px;
  border-radius: 6px;
  position: absolute;
  z-index: 1000;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 12px;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  
  /* Smart sizing */
  max-width: min(320px, calc(100vw - 40px));
  width: max-content;
  min-width: 140px;
  box-sizing: border-box;
  
  /* Text handling */
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere; /* Better than break-word */
  line-height: 1.4;
  
  /* RTL/LTR support */
  direction: auto; /* Automatically detects text direction */
  
  /* Boundary protection */
  left: clamp(20px, 50%, calc(100% - 20px));
  transform: translateX(-50%) translateY(-5px);
}

/* Arrow */
.custom-tooltip .tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

/* Hover effects */
.custom-tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ====== Mobile Adaptations ====== */
@media (max-width: 768px) {
  .custom-tooltip .tooltip-text {
    font-size: 13px;
    padding: 8px 12px;
    max-width: calc(100vw - 30px);
    
    /* Force left-align on mobile for readability */
    text-align: start;
  }
  
  /* Edge positioning */
  .custom-tooltip:first-child .tooltip-text {
    left: 15px;
    right: auto;
    transform: translateY(0);
  }
  
  .custom-tooltip:last-child .tooltip-text {
    left: auto;
    right: 15px;
    transform: translateY(0);
  }
}

/* ====== Arabic/RTL Specific Fixes ====== */
[lang="ar"] .custom-tooltip .tooltip-text,
[dir="rtl"] .custom-tooltip .tooltip-text {
  text-align: right;
  direction: rtl;
}
